rickyk4504
10/25/2022, 9:00 PMrahul1
10/25/2022, 9:01 PMrickyk4504
10/25/2022, 9:09 PMrahul1
10/25/2022, 9:39 PMrahul1
10/25/2022, 9:42 PMrickyk4504
10/25/2022, 9:58 PMrahul1
10/25/2022, 10:21 PMrahul1
10/25/2022, 10:30 PMObservation (https://www.medplum.com/docs/api/fhir/resources/observation)
- The subject will be the Patient
- the code will be the type of vital sign you're recording
- you'll use valueQuantity for recording numerical values
- You can see some example data in our "mock" package (https://github.com/medplum/medplum/blob/b96c2fdde914ec9099ccc27d344d7ef63bba7c44/packages/mock/src/mocks/simpsons.ts)
- Our tutorials show how to create Observations and put them into reports. These are tailored to a lab use case, but could easily be modified for RPM (https://www.medplum.com/docs/tutorials/api-basics/create-fhir-data).rickyk4504
10/25/2022, 10:31 PMrickyk4504
10/30/2022, 6:06 PMrickyk4504
10/30/2022, 6:07 PMrahul1
10/31/2022, 3:03 AMrahul1
10/31/2022, 3:14 AMreshma
11/02/2022, 2:06 AMrickyk4504
11/09/2022, 1:04 AMrahul1
11/09/2022, 1:09 AMrahul1
11/09/2022, 1:09 AMrickyk4504
11/09/2022, 1:14 AMlet obs = try fhirFactory?.observation(from: sample)
obs?.status = .final
let serviceReqRef = Reference()
serviceReqRef.reference = "ServiceRequest/2daad37c-fec8-4467-8424-d6cd18cae436"
obs?.basedOn = [serviceReqRef]
let ptRef = Reference()
ptRef.reference = "Patient/56799d75-b773-4f83-b4ac-ffc47fe982c8" Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â Â
obs?.subject = ptRef
- I think it's almost working — medplum API returns 201s after I post observations and they look successful. However I don't see any observations associated with the service request in the UIrickyk4504
11/09/2022, 1:15 AMrahul1
11/09/2022, 1:36 AMrickyk4504
11/09/2022, 1:39 AMrahul1
11/09/2022, 1:48 AMrahul1
11/09/2022, 1:49 AMDiagnosticReport.result property to be an array of points to your Observations.rahul1
11/09/2022, 1:50 AMrahul1
11/09/2022, 1:53 AM"ServiceRequest/2daad37c-fec8-4467-8424-d6cd18cae436". It's not super obvious from the docs, but the server assigns ids when you create a resources. So even if you send up a specific ID when you create the resource, the server will assign it's own - helps ensure uniqueness that wayrickyk4504
11/09/2022, 1:54 AMrickyk4504
11/09/2022, 1:54 AMrahul1
11/09/2022, 1:54 AMrickyk4504
11/09/2022, 1:55 AMrahul1
11/09/2022, 1:55 AMrickyk4504
11/09/2022, 1:58 AMrahul1
11/09/2022, 1:59 AMrickyk4504
11/09/2022, 2:00 AMrickyk4504
11/09/2022, 2:01 AMrickyk4504
11/09/2022, 2:01 AMrahul1
11/09/2022, 2:03 AMrickyk4504
11/09/2022, 2:05 AMrickyk4504
11/09/2022, 2:05 AMrahul1
11/09/2022, 2:06 AMrahul1
11/09/2022, 2:07 AMrickyk4504
11/09/2022, 2:10 AMrickyk4504
11/10/2022, 6:37 PMrahul1
11/10/2022, 7:55 PM